""" Chat

Example
=======
chat = ErnieChat()

while True:
    question = input(">>> ")
    answer = chat.chat(question)
    print(answer)
"""
import logging
import erniebot

from .ernie import ErnieChat
from .spark import SparkChat
from .models_in_g4f import GPT4Chat

logger = logging.getLogger("chat")
logger.setLevel(logging.DEBUG)

fh = logging.FileHandler("chat.log")
formatter = logging.Formatter("[%(asctime)s %(levelname)s] %(filename)s, line %(lineno)d: %(message)s")
fh.setFormatter(formatter)

logger.addHandler(fh)

